package com.inspur.security.cbb3.kms.enums;

/**
 * @author: lijunchang
 * @Description: 密钥状态枚举
 * @Date: 2020/11/9
 */
public enum SecretKeyStatus {
    /**
     * 其他
     */
    OTHER,
    /**
     * 正常
     */
    Normal,
    /**
     * 过期
     */
    Expired;

    public static SecretKeyStatus getByType(String type){
        for (SecretKeyStatus constants : values()) {
            if (constants.name().equalsIgnoreCase(type)) {
                return constants;
            }
        }
        return OTHER;
    }
}
